package ch.myDungeons.view;

import javax.swing.JPanel;
import javax.swing.JTextArea;


/**
 * A JPanel containing the info display in the lower right corner of the screen
 * @author Grii
 *
 */
public class InfoView extends JPanel {
	private static final long serialVersionUID = -3185344969503984934L;
	
	private JTextArea characterInfo;
	
	public InfoView(int sizeX, int sizeY){
		this.setLayout(null);
		this.setSize(sizeX, sizeY);
		
		characterInfo = new JTextArea();
		characterInfo.setLocation(0, 0);
		characterInfo.setSize(sizeX, sizeY);
		characterInfo.setEditable(false);
		this.add(characterInfo);
	}
	
	public void updateInfo(String info){
		characterInfo.setText(info);
	}
}
